<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: contracts/tic_tac_toe/tic_tac_toe.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_822c996966d1ea617c855d743c3f3186.html">tic_tac_toe</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tic_tac_toe.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="tic__tac__toe_8hpp_source.html">tic_tac_toe.hpp</a>&gt;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacetic__tac__toe"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html">tic_tac_toe</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6f32b76cb96a584daeacd2fd81de47d2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a6f32b76cb96a584daeacd2fd81de47d2">tic_tac_toe::is_empty_cell</a> (const <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> &amp;cell)</td></tr>
<tr class="memdesc:a6f32b76cb96a584daeacd2fd81de47d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if cell is empty.  <a href="namespacetic__tac__toe.html#a6f32b76cb96a584daeacd2fd81de47d2">More...</a><br /></td></tr>
<tr class="separator:a6f32b76cb96a584daeacd2fd81de47d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb2ba327b8a040528d6b773f72712b28"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#abb2ba327b8a040528d6b773f72712b28">tic_tac_toe::is_valid_movement</a> (const movement &amp;mvt, const game &amp;game_for_movement)</td></tr>
<tr class="memdesc:abb2ba327b8a040528d6b773f72712b28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check for valid movement  Movement is considered valid if it is inside the board and done on empty cell.  <a href="namespacetic__tac__toe.html#abb2ba327b8a040528d6b773f72712b28">More...</a><br /></td></tr>
<tr class="separator:abb2ba327b8a040528d6b773f72712b28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87364eb508987ae99315cb550318a2cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a87364eb508987ae99315cb550318a2cd">tic_tac_toe::get_winner</a> (const game &amp;current_game)</td></tr>
<tr class="memdesc:a87364eb508987ae99315cb550318a2cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get winner of the game  Winner of the game is the first player who made three consecutive aligned movement.  <a href="namespacetic__tac__toe.html#a87364eb508987ae99315cb550318a2cd">More...</a><br /></td></tr>
<tr class="separator:a87364eb508987ae99315cb550318a2cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a1cf506a98d2d47fa5beecf5f4fc5df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a2a1cf506a98d2d47fa5beecf5f4fc5df">tic_tac_toe::apply_create</a> (const create &amp;c)</td></tr>
<tr class="memdesc:a2a1cf506a98d2d47fa5beecf5f4fc5df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply create action.  <a href="namespacetic__tac__toe.html#a2a1cf506a98d2d47fa5beecf5f4fc5df">More...</a><br /></td></tr>
<tr class="separator:a2a1cf506a98d2d47fa5beecf5f4fc5df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aab36c5e82f82de8f84052cff22e2a4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a3aab36c5e82f82de8f84052cff22e2a4">tic_tac_toe::apply_restart</a> (const restart &amp;r)</td></tr>
<tr class="memdesc:a3aab36c5e82f82de8f84052cff22e2a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply restart action.  <a href="namespacetic__tac__toe.html#a3aab36c5e82f82de8f84052cff22e2a4">More...</a><br /></td></tr>
<tr class="separator:a3aab36c5e82f82de8f84052cff22e2a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71654d11099ad786f398b81cbb49b516"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a71654d11099ad786f398b81cbb49b516">tic_tac_toe::apply_close</a> (const close &amp;c)</td></tr>
<tr class="memdesc:a71654d11099ad786f398b81cbb49b516"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply close action.  <a href="namespacetic__tac__toe.html#a71654d11099ad786f398b81cbb49b516">More...</a><br /></td></tr>
<tr class="separator:a71654d11099ad786f398b81cbb49b516"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e150e574fbbc4aa01f6d904777fff09"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetic__tac__toe.html#a7e150e574fbbc4aa01f6d904777fff09">tic_tac_toe::apply_move</a> (const move &amp;m)</td></tr>
<tr class="memdesc:a7e150e574fbbc4aa01f6d904777fff09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply move action.  <a href="namespacetic__tac__toe.html#a7e150e574fbbc4aa01f6d904777fff09">More...</a><br /></td></tr>
<tr class="separator:a7e150e574fbbc4aa01f6d904777fff09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02fd73d861ef2e4aabb38c0c9ff82947"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tic__tac__toe_8cpp.html#a02fd73d861ef2e4aabb38c0c9ff82947">init</a> ()</td></tr>
<tr class="separator:a02fd73d861ef2e4aabb38c0c9ff82947"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c01edc4ed313916967237c16feb1446"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="tic__tac__toe_8cpp.html#a3c01edc4ed313916967237c16feb1446">apply</a> (<a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> code, <a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="el" href="structeosio_1_1action.html">action</a>)</td></tr>
<tr class="memdesc:a3c01edc4ed313916967237c16feb1446"><td class="mdescLeft">&#160;</td><td class="mdescRight">The apply method implements the dispatch of events to this contract.  <a href="#a3c01edc4ed313916967237c16feb1446">More...</a><br /></td></tr>
<tr class="separator:a3c01edc4ed313916967237c16feb1446"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section copyright"><dt>Copyright</dt><dd>defined in eos/LICENSE.txt </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3c01edc4ed313916967237c16feb1446"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c01edc4ed313916967237c16feb1446">&#9670;&nbsp;</a></span>apply()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void apply </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&#160;</td>
          <td class="paramname"><em>action</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a02fd73d861ef2e4aabb38c0c9ff82947"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02fd73d861ef2e4aabb38c0c9ff82947">&#9670;&nbsp;</a></span>init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The <a class="el" href="tic__tac__toe_8cpp.html#a02fd73d861ef2e4aabb38c0c9ff82947">init()</a> and <a class="el" href="tic__tac__toe_8cpp.html#a3c01edc4ed313916967237c16feb1446" title="The apply method implements the dispatch of events to this contract. ">apply()</a> methods must have C calling convention so that the blockchain can lookup and call these methods. This method is called once when the contract is published or updated. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
